import request from '@/utils/request'

const api_name = 'http://localhost/consumer/admin/user'

export default {
  //用户列表
  getPageList(page, limit, searchObj) {  //searchObj为后端的UserInfoQueryVo对象
    return request({
      url: `${api_name}/list/${page}/${limit}`,
      method: 'post',
      data: searchObj
    })
  },
  //用户锁定
  lock(id, status) {
    return request({
      url: `${api_name}/lock/${id}/${status}`,
      method: 'post'
    })
  },
  //用户详情
  show(id) {
    return request({
     url: `${api_name}/show/By/${id}`,
     method: 'post'
    })
  },
  /*
            userInfo: {}, // 会员信息
            patientList: [] // 就诊人列表
   */


  //认证审批
  approval(id, authStatus) {
    return request({
     url: `${api_name}/approval/${id}/${authStatus}`,
     method: 'post'
    })
  },

  //删除用户
  delectUserinfo(id){
    return request({
      url: `${api_name}/delectUserinfo/${id}`,
      method: 'post'
    })
  }
}

